<template>
  <div>
    <first-burst title="每日首爆 1" :show="!show && activity_type==1?true:false" :data="data" @onHideDetails="onHideDetails" :propDataArray="propDataArray"/>
    <registration title="注册送金 3" :show="!show && activity_type==3?true:false" :data="data" @onHideDetails="onHideDetails" :propDataArray="propDataArray"/>
    <recharge title="首充 7" :show="!show && activity_type==7?true:false" :data="data" @onHideDetails="onHideDetails" :propDataArray="propDataArray" :goodsData="goodsAllData"/>
    <pinduoduo title="拼多多 9" :show="!show && activity_type==9?true:false" :data="data" @onHideDetails="onHideDetails"/>
    <top-up title="充值活动 10" :show="!show && activity_type==10?true:false" :data="data" @onHideDetails="onHideDetails" :goodsData="goodsAllData" :propDataArray="propDataArray"/>
    <binding title="绑定有礼 11" :show="!show && activity_type==11?true:false" :data="data" @onHideDetails="onHideDetails" :propDataArray="propDataArray"/>
    <download title="下载有礼 12" :show="!show && activity_type==12?true:false" :data="data" @onHideDetails="onHideDetails" :propDataArray="propDataArray"/>
    <week-vip title="VIP周礼包 13" :show="!show && activity_type==13?true:false" :data="data" @onHideDetails="onHideDetails" :propDataArray="propDataArray"/>
    <seven-login title="七日登录 15" :show="!show && activity_type==15?true:false" :data="data" @onHideDetails="onHideDetails" :propDataArray="propDataArray"/>
    <roulette-wheel title="充值轮盘 16" :show="!show && activity_type==16?true:false" :data="data" @onHideDetails="onHideDetails" :propDataArray="propDataArray" :languageDataArray="languageDataArray"/>
    <month-card title="月卡 17" :show="!show && activity_type==17?true:false" :data="data" @onHideDetails="onHideDetails" :goodDataArray="goodsAllData"/>
    <pinduoduo-wheel title="拼多多转盘 18" :show="!show && activity_type==18?true:false" :data="data" @onHideDetails="onHideDetails" :propDataArray="propDataArray"/>
    <proxy-upgrade title="代理升级 19" :show="!show && activity_type==19?true:false" :data="data" @onHideDetails="onHideDetails" :propDataArray="propDataArray"/>
  </div>
</template>

<script>
import FirstBurst from './firstBurst/page-details'
import Download from './download/page-details'
import Binding from './binding/page-details'
import Pinduoduo from './pinduoduo/page-details'
import Recharge from './recharge/page-details'
import Registration from './registration/page-details'
import TopUp from './topUp/page-details'
import WeekVip from './vipWeek/page-details'
import SevenLogin from './sevenLogin/details'
import RouletteWheel from './rouletteWheel/page-details'
import MonthCard from './monthCard/page-details'
import PinduoduoWheel from './pinduoduoWheel/page-details'
import ProxyUpgrade from './proxyUpgrade/page-details'

export default {
  components: {
    FirstBurst,
    Download,
    Binding,
    Pinduoduo,
    Recharge,
    Registration,
    TopUp,
    WeekVip,
    SevenLogin,
    RouletteWheel,
    MonthCard,
    PinduoduoWheel,
    ProxyUpgrade
  },
  props: {
    show: {
      type: Boolean,
      default: false
    },
    activity_type: {
      type: Number,
      default: 0
    },
    data: {
      type: Object,
      default: function () {
        return {}
      }
    },
  },
  data () {
    return {
      goodsAllData:this.$store.state.commonState.goodDataArray,
      propDataArray: this.$store.state.commonState.propDataArray,
      languageDataArray: this.$store.state.commonState.languageDataArray,
    }
  },
  computed:{
    allGoods(){
      return this.$store.state.commonState.goodDataArray
    },
    allProp(){
      return this.$store.state.commonState.propDataArray
    },
    allLanguage(){
      return this.$store.state.commonState.languageDataArray
    }
  },
  watch:{
    allGoods:{
      handler(newVal){
        if (newVal) {
          this.goodsAllData=newVal
        }
      }
    },
    allProp:{
      handler(newVal){
        if (newVal) {
          this.propDataArray=newVal
        }
      }
    },
    allLanguage:{
      handler(newVal){
        if (newVal) {
          this.languageDataArray=newVal
        }
      }
    }
  },
  methods: {
    onHideDetails (show) {
      this.$emit('onHideDetails',show)
    },
  }
}
</script>

<style scoped lang="scss">

</style>
